/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package domain;

import java.util.LinkedList;
import java.util.Random;
import sommm.Dictionar;
import sommm.DimList;
import sommm.Element;

/**
 *
 * @author Administrator
 */
public class MapNode extends Element {
    int x,y;
    LinkedList<NewsArticle> listaN;

    public MapNode() {
        super();
        listaN= new LinkedList<NewsArticle>();

    }

    public void init()
    {
        Random rd =  new Random(0);
        for(String s : Dictionar.getInstance().getLista())
        {
            dimensiuni.setAparitii(s, rd.nextInt(10));
        }
    }

    public int getX() {
        return x;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getY() {
        return y;
    }

    public void setX(int x) {
        this.x = x;
    }

    public DimList getMid()
    {
        DimList dl = new DimList();
        for(NewsArticle na : listaN)
        {

        }
        return  dl;
    }

    public void addNA(NewsArticle na)
    {
        listaN.add(na);
    }

    @Override
    public String toString()
    {
        String s="";
        for(NewsArticle na : listaN)
            s += na.getFileName() + "/" + na.getDate()+"\n";
        return s;
    }
}
